package com.gg.registration.hospital.repository;

import com.gg.registration.model.hosp.Schedule;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author chenjunjia
 * @date 2022/4/10 11:14
 */
@Repository
public interface ScheduleRepository extends MongoRepository<Schedule,String> {
    //根据医院编号 和 排班编号查询
    Schedule getScheduleByHoscodeAndHosScheduleId(String hoscode, String hosScheduleId);

    //根据医院编号 、科室编号和工作日期，查询排班详细信息
    List<Schedule> findScheduleByHoscodeAndDepcodeAndWorkDate(String hoscode, String depcode, Date toDate);

//    void save(Schedule scheduleExist);

//    Page<Schedule> findAll(Example<Schedule> example, Pageable pageable);

    void deleteById(String id);

    Schedule getById(String scheduleId);

//    List<Object> findById(String scheduleId);
}
